#import <Foundation/Foundation.h>
#import <objc/runtime.h>

#import "FWTransToolbar.h"


@implementation FWTransToolbar


// ******************************************************************************************
#pragma mark -
#pragma mark Initialisation and object management

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, 16)];
    [self applyTranslucentBackground];
    return self;
}


// ******************************************************************************************
#pragma mark -
#pragma mark Drawing and updating

- (void)drawRect:(CGRect)rect
{
    // Don't draw anything - this prevents the background showing
}

- (void)applyTranslucentBackground
{
    self.backgroundColor = [UIColor clearColor];
    self.opaque = NO;
    self.translucent = YES;
}


// ******************************************************************************************
#pragma mark -
#pragma mark Item layout and dimensioning

- (CGSize)sizeThatFits:(CGSize)fits
{
    return CGSizeMake(fits.width, 16);
}

@end
